<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div {
            width: 100px;
            height: 100px;
            /* 显示模式转换 行内 行内块 块 */
            display: inline;
        }
        .div1 {
            background-color: blueviolet;
        }

        .div2 {
            background-color: rgb(226, 43, 92);
        }


        span {
            width: 100px;
            height: 100px;
        }
        .span2 {
            background-color: blueviolet;
        }

        .span1 {
            background-color: rgb(226, 43, 92);
        }
        

    </style>
</head>
<body>
    <!-- 块元素:独占一行,宽度默认是父级的100%,添加宽高属性生效-->
    <div class="div1">div1</div>
    <div class="div2">div2</div>

    <!-- 行内元素:一行共存多个, 宽高不生效,  -->
    <span class="span1">span1</span>
    <span class="span2">span2</span>


    <!-- 行内块元素: 一行共存多个, 宽高生效 -->
    <img src="../img/2023031114585708.jpg" alt="">
    <img src="../img/2023031114585708.jpg" alt="">

    
    <!-- 显示模式转换 -->

</body>
</html>